package training;

import java.util.Scanner;

public class Day3_01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String tmp = "";
        String res = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(c >= '0' && c <= '9'){
                while (i < s.length() && s.charAt(i) >= '0' && s.charAt(i) <= '9') {
                    tmp += s.charAt(i);
                    i++;
                }
            }
            if(tmp.length() > res.length()){
                res = tmp;
            }
            tmp = "";
        }
        System.out.println(res);
    }
}
